[bugfix] macOS .app: accept Java 21+ for JVM discovery#6436
Open
joewiz wants to merge 1 commit into
Open
Conversation
The appbundler-maven-plugin writes <jvmRequired> verbatim into the
.app bundle's Info.plist as JVMVersion. Apple's JavaAppLauncher uses
that key (and the convention "<major>+") to gate which installed JVM
it will use to launch the app. With <jvmRequired>21</jvmRequired> the
launcher's plist contains JVMVersion = 21 (a strict match), so a
host with only Java 22 / 23 / 24 / … installed would be rejected even
though eXist runs fine on those.
Switch to "21+" — matches the established Apple convention (1.6+,
1.7+, 1.8+, …) and lines up with how Zulu / Temurin / Liberica / Apple
JDKs all install their major-version directories. Verified the plugin
propagates the literal:
/usr/libexec/PlistBuddy -c "Print :JVMVersion" Contents/Info.plist
# 21+
Follow-up to @duncdrum review on PR eXist-db#6434 (eXist-db#6434 (comment)).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[This PR was co-authored with Claude Code. -Joe]
Summary
The macOS
.appbundle'sInfo.plistJVMVersionkey currently reads21(literal). Apple'sJavaAppLauncherinterprets that as a strict match: hosts that only have Java 22 / 23 / 24 installed would be rejected even though eXist runs fine on those. Switch to21+— the established Apple-convention "this major or later" form (1.6+,1.7+,1.8+, …) — so the launcher picks up any JDK ≥ 21.Follow-up to @duncdrum's review on PR #6434 (#6434 (comment)), where he flagged the same JVM-discoverability concern.
What changed
exist-distribution/pom.xml, line 926:<jvmRequired>21</jvmRequired>→<jvmRequired>21+</jvmRequired>.The
appbundler-maven-pluginpropagates this value intoInfo.plistverbatim as a string, so the+reaches the launcher with no further plumbing.Verification
End-to-end JVM-discovery testing against the various JDK distributions @duncdrum mentioned (Zulu / Temurin / system-default) needs the full signed-and-notarized DMG pipeline, which happens on a release cut — so the "would Zulu have been discovered before this change?" question is best answered against the next beta DMG.
Related
JavaAppLauncherconvention forJVMVersion: trailing+denotes "this version or later"